using System;
using Gtk;

using System.Data.Linq;
using Mono.Data.Sqlite;
using System.Linq;


using nwind;

namespace BanVeTau
{
  class MainClass
  {
    public static void Main (string[] args)
    {
      Application.Init ();
      var conn = new SqliteConnection (
				       "DbLinqProvider=Sqlite;" +
				       "Data Source=db_bvt.db"
				       );
      nwind.Main db = new nwind.Main (conn);


      var customs = from p in db.Customer
	where p.CustomerName == "Ladonna Tai"
	select p;




      foreach (Customer custom in customs) {
	Console.WriteLine (" CategoryID: {0}", custom.CustomerIdcard);
      }

      //			Customer tuan = new Customer();
      //			tuan.CustomerName = "Le Minh Tuan";
      //			tuan.CustomerIdcard = "1344";
      //			db.Customer.InsertOnSubmit(tuan);
      //			db.SubmitChanges();
      //			foreach (Customer cus in db.Customer) {
      //
      //				Console.WriteLine ("CustomerName: {0}", cus.CustomerName);
      //			}

      MainWindow win = new MainWindow ();
      win.Show ();
      Application.Run ();
    }
  }
}
